<include file="public/header"/>

<body>

<!--main-->
<div class="xgLogin-main">
  <div class="xgLogin-logo">
    <img src="__PUBLIC__/home/images/logo.png">
  </div>
  <form id="register">
  <ul class="xgLogin-filed">
    <!--<li>-->
      <!--<label>昵称</label>-->
      <!--<input type="text" class="inpt"  placeholder="请输入您的昵称" name="username">-->
    <!--</li>-->
    <li>
      <label>手机号</label>
      <input type="text" class="inpt"  placeholder="请输入您的手机号" name="phone" id="phone">
    </li>
    <li>
      <label>验证码</label>
      <input type="text" class="inpt" placeholder="请输入您的验证码" name="code">
      <a href="javascript:;" class="send-yzm" id="send"  onClick="send_code('phone',1)" >获取验证码</a>
      <a href="javascript:;" class="send-yzm" id="send_wait" style="color: #6f7885" ></a>
    </li>
    <li>
      <label>密码</label>
      <input type="password" class="inpt" placeholder="请输入您的密码" name="password">
    </li>
  </ul>
  </form>
  <div class="xgLogin-submit">
    <!--<input type="button" value="确认" class="btn" onclick="register()">-->
    <a href="javascript:;" class="btn" onclick="register()">注册</a>
    <div class="no-account">
      <a href="{:U('User/login')}" class="c-green">立即登陆 ></a>
    </div>
    <!--<p>其他登陆方式</p>-->
    <!--<div class="other">-->
      <!--<a href="#"><img src="__PUBLIC__/home/images/other-weix.png"></a> <a href="#"><img src="__PUBLIC__/home/images/other-phone.png"></a>-->
    <!--</div>-->
  </div>
</div>
<!--main End-->

<script>
    function register(){
        var phone = $('input[name="phone"]').val();
        if(checkPhone(phone,'手机号不正确或为空')){
            var c = $('input[name="code"]').val();

          // console.log("{:U('Home/User/register')}");
          // ajax_submit('register', "{:U('Home/User/register')}");
          // return  false;
            if(empty(c,'短信验证码不能为空')){
              console.log("{:U('Home/User/register')}");
                ajax_submit('register', "{:U('Home/User/register')}");
            }}
    }
</script>

</body>
</html>
